3.249 \(\int \sec ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^3 \, dx\)

Optimal. Leaf size=119 \[ \frac {a^3 \log (\cos (c+d x))}{d}+\frac {b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{3 d}+\frac {a \left (a^2-3 b^2\right ) \sec ^2(c+d x)}{2 d}-\frac {3 a^2 b \sec (c+d x)}{d}+\frac {3 a b^2 \sec ^4(c+d x)}{4 d}+\frac {b^3 \sec ^5(c+d x)}{5 d} \]

[Out]

a^3*ln(cos(d*x+c))/d-3*a^2*b*sec(d*x+c)/d+1/2*a*(a^2-3*b^2)*sec(d*x+c)^2/d+1/3*b*(3*a^2-b^2)*sec(d*x+c)^3/d+3/
4*a*b^2*sec(d*x+c)^4/d+1/5*b^3*sec(d*x+c)^5/d

________________________________________________________________________________________

Rubi [A]  time = 0.22, antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4397, 2837, 12, 894} \[ \frac {b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{3 d}+\frac {a \left (a^2-3 b^2\right ) \sec ^2(c+d x)}{2 d}-\frac {3 a^2 b \sec (c+d x)}{d}+\frac {a^3 \log (\cos (c+d x))}{d}+\frac {3 a b^2 \sec ^4(c+d x)}{4 d}+\frac {b^3 \sec ^5(c+d x)}{5 d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^3*(a*Sin[c + d*x] + b*Tan[c + d*x])^3,x]

[Out]

(a^3*Log[Cos[c + d*x]])/d - (3*a^2*b*Sec[c + d*x])/d + (a*(a^2 - 3*b^2)*Sec[c + d*x]^2)/(2*d) + (b*(3*a^2 - b^
2)*Sec[c + d*x]^3)/(3*d) + (3*a*b^2*Sec[c + d*x]^4)/(4*d) + (b^3*Sec[c + d*x]^5)/(5*d)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 894

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && IntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 2837

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)
*(x_)])^(n_.), x_Symbol] :> Dist[1/(b^p*f), Subst[Int[(a + x)^m*(c + (d*x)/b)^n*(b^2 - x^2)^((p - 1)/2), x], x
, b*Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IntegerQ[(p - 1)/2] && NeQ[a^2 - b^2, 0]

Rule 4397

Int[u_, x_Symbol] :> Int[TrigSimplify[u], x] /; TrigSimplifyQ[u]

Rubi steps

\begin {align*} \int \sec ^3(c+d x) (a \sin (c+d x)+b \tan (c+d x))^3 \, dx &=\int (b+a \cos (c+d x))^3 \sec ^3(c+d x) \tan ^3(c+d x) \, dx\\ &=-\frac {\operatorname {Subst}\left (\int \frac {a^6 (b+x)^3 \left (a^2-x^2\right )}{x^6} \, dx,x,a \cos (c+d x)\right )}{a^3 d}\\ &=-\frac {a^3 \operatorname {Subst}\left (\int \frac {(b+x)^3 \left (a^2-x^2\right )}{x^6} \, dx,x,a \cos (c+d x)\right )}{d}\\ &=-\frac {a^3 \operatorname {Subst}\left (\int \left (\frac {a^2 b^3}{x^6}+\frac {3 a^2 b^2}{x^5}+\frac {3 a^2 b-b^3}{x^4}+\frac {a^2-3 b^2}{x^3}-\frac {3 b}{x^2}-\frac {1}{x}\right ) \, dx,x,a \cos (c+d x)\right )}{d}\\ &=\frac {a^3 \log (\cos (c+d x))}{d}-\frac {3 a^2 b \sec (c+d x)}{d}+\frac {a \left (a^2-3 b^2\right ) \sec ^2(c+d x)}{2 d}+\frac {b \left (3 a^2-b^2\right ) \sec ^3(c+d x)}{3 d}+\frac {3 a b^2 \sec ^4(c+d x)}{4 d}+\frac {b^3 \sec ^5(c+d x)}{5 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.32, size = 99, normalized size = 0.83 \[ \frac {60 a^3 \log (\cos (c+d x))-20 b \left (b^2-3 a^2\right ) \sec ^3(c+d x)+30 a \left (a^2-3 b^2\right ) \sec ^2(c+d x)-180 a^2 b \sec (c+d x)+45 a b^2 \sec ^4(c+d x)+12 b^3 \sec ^5(c+d x)}{60 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^3*(a*Sin[c + d*x] + b*Tan[c + d*x])^3,x]

[Out]

(60*a^3*Log[Cos[c + d*x]] - 180*a^2*b*Sec[c + d*x] + 30*a*(a^2 - 3*b^2)*Sec[c + d*x]^2 - 20*b*(-3*a^2 + b^2)*S
ec[c + d*x]^3 + 45*a*b^2*Sec[c + d*x]^4 + 12*b^3*Sec[c + d*x]^5)/(60*d)

________________________________________________________________________________________

fricas [A]  time = 0.65, size = 109, normalized size = 0.92 \[ \frac {60 \, a^{3} \cos \left (d x + c\right )^{5} \log \left (-\cos \left (d x + c\right )\right ) - 180 \, a^{2} b \cos \left (d x + c\right )^{4} + 45 \, a b^{2} \cos \left (d x + c\right ) + 30 \, {\left (a^{3} - 3 \, a b^{2}\right )} \cos \left (d x + c\right )^{3} + 12 \, b^{3} + 20 \, {\left (3 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2}}{60 \, d \cos \left (d x + c\right )^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3*(a*sin(d*x+c)+b*tan(d*x+c))^3,x, algorithm="fricas")

[Out]

1/60*(60*a^3*cos(d*x + c)^5*log(-cos(d*x + c)) - 180*a^2*b*cos(d*x + c)^4 + 45*a*b^2*cos(d*x + c) + 30*(a^3 -
3*a*b^2)*cos(d*x + c)^3 + 12*b^3 + 20*(3*a^2*b - b^3)*cos(d*x + c)^2)/(d*cos(d*x + c)^5)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: TypeError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3*(a*sin(d*x+c)+b*tan(d*x+c))^3,x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,x):;OUTPUT:Modg
cd: no suitable evaluation pointindex.cc index_m operator + Error: Bad Argument ValueUnable to check sign: (2*
pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to check sign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to check sig
n: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to check sign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to che
ck sign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to check sign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable
to check sign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to check sign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)U
nable to check sign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to check sign: (2*pi/t_nostep/2)>(-2*pi/t_nost
ep/2)Unable to check sign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to check sign: (2*pi/t_nostep/2)>(-2*pi/
t_nostep/2)Unable to check sign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to check sign: (2*pi/t_nostep/2)>(
-2*pi/t_nostep/2)Unable to check sign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to check sign: (2*pi/t_noste
p/2)>(-2*pi/t_nostep/2)Unable to check sign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to check sign: (2*pi/t
_nostep/2)>(-2*pi/t_nostep/2)Unable to check sign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to check sign: (
2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to check sign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to check s
ign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to check sign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Unable to c
heck sign: (2*pi/t_nostep/2)>(-2*pi/t_nostep/2)Evaluation time: 78.52Done

________________________________________________________________________________________

maple [B]  time = 0.14, size = 252, normalized size = 2.12 \[ \frac {a^{3} \left (\tan ^{2}\left (d x +c \right )\right )}{2 d}+\frac {a^{3} \ln \left (\cos \left (d x +c \right )\right )}{d}+\frac {a^{2} b \left (\sin ^{4}\left (d x +c \right )\right )}{d \cos \left (d x +c \right )^{3}}-\frac {a^{2} b \left (\sin ^{4}\left (d x +c \right )\right )}{d \cos \left (d x +c \right )}-\frac {\cos \left (d x +c \right ) \left (\sin ^{2}\left (d x +c \right )\right ) a^{2} b}{d}-\frac {2 a^{2} b \cos \left (d x +c \right )}{d}+\frac {3 a \,b^{2} \left (\sin ^{4}\left (d x +c \right )\right )}{4 d \cos \left (d x +c \right )^{4}}+\frac {b^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{5 d \cos \left (d x +c \right )^{5}}+\frac {b^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{15 d \cos \left (d x +c \right )^{3}}-\frac {b^{3} \left (\sin ^{4}\left (d x +c \right )\right )}{15 d \cos \left (d x +c \right )}-\frac {b^{3} \cos \left (d x +c \right ) \left (\sin ^{2}\left (d x +c \right )\right )}{15 d}-\frac {2 b^{3} \cos \left (d x +c \right )}{15 d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^3*(a*sin(d*x+c)+b*tan(d*x+c))^3,x)

[Out]

1/2/d*a^3*tan(d*x+c)^2+a^3*ln(cos(d*x+c))/d+1/d*a^2*b*sin(d*x+c)^4/cos(d*x+c)^3-1/d*a^2*b*sin(d*x+c)^4/cos(d*x
+c)-1/d*cos(d*x+c)*sin(d*x+c)^2*a^2*b-2*a^2*b*cos(d*x+c)/d+3/4/d*a*b^2*sin(d*x+c)^4/cos(d*x+c)^4+1/5/d*b^3*sin
(d*x+c)^4/cos(d*x+c)^5+1/15/d*b^3*sin(d*x+c)^4/cos(d*x+c)^3-1/15/d*b^3*sin(d*x+c)^4/cos(d*x+c)-1/15/d*b^3*cos(
d*x+c)*sin(d*x+c)^2-2/15*b^3*cos(d*x+c)/d

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 128, normalized size = 1.08 \[ -\frac {30 \, a^{3} {\left (\frac {1}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right )^{2} - 1\right )\right )} - \frac {45 \, {\left (2 \, \sin \left (d x + c\right )^{2} - 1\right )} a b^{2}}{\sin \left (d x + c\right )^{4} - 2 \, \sin \left (d x + c\right )^{2} + 1} + \frac {60 \, {\left (3 \, \cos \left (d x + c\right )^{2} - 1\right )} a^{2} b}{\cos \left (d x + c\right )^{3}} + \frac {4 \, {\left (5 \, \cos \left (d x + c\right )^{2} - 3\right )} b^{3}}{\cos \left (d x + c\right )^{5}}}{60 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^3*(a*sin(d*x+c)+b*tan(d*x+c))^3,x, algorithm="maxima")

[Out]

-1/60*(30*a^3*(1/(sin(d*x + c)^2 - 1) - log(sin(d*x + c)^2 - 1)) - 45*(2*sin(d*x + c)^2 - 1)*a*b^2/(sin(d*x +
c)^4 - 2*sin(d*x + c)^2 + 1) + 60*(3*cos(d*x + c)^2 - 1)*a^2*b/cos(d*x + c)^3 + 4*(5*cos(d*x + c)^2 - 3)*b^3/c
os(d*x + c)^5)/d

________________________________________________________________________________________

mupad [B]  time = 4.15, size = 220, normalized size = 1.85 \[ -\frac {2\,a^3\,\mathrm {atanh}\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\right )}{d}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (6\,a^3+12\,a^2\,b-12\,a\,b^2+4\,b^3\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (-6\,a^3-28\,a^2\,b+12\,a\,b^2+\frac {4\,b^3}{3}\right )-2\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8-4\,a^2\,b+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (2\,a^3+20\,a^2\,b+\frac {4\,b^3}{3}\right )-\frac {4\,b^3}{15}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}-5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6-10\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*sin(c + d*x) + b*tan(c + d*x))^3/cos(c + d*x)^3,x)

[Out]

- (2*a^3*atanh(tan(c/2 + (d*x)/2)^2))/d - (tan(c/2 + (d*x)/2)^6*(12*a^2*b - 12*a*b^2 + 6*a^3 + 4*b^3) + tan(c/
2 + (d*x)/2)^4*(12*a*b^2 - 28*a^2*b - 6*a^3 + (4*b^3)/3) - 2*a^3*tan(c/2 + (d*x)/2)^8 - 4*a^2*b + tan(c/2 + (d
*x)/2)^2*(20*a^2*b + 2*a^3 + (4*b^3)/3) - (4*b^3)/15)/(d*(5*tan(c/2 + (d*x)/2)^2 - 10*tan(c/2 + (d*x)/2)^4 + 1
0*tan(c/2 + (d*x)/2)^6 - 5*tan(c/2 + (d*x)/2)^8 + tan(c/2 + (d*x)/2)^10 - 1))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**3*(a*sin(d*x+c)+b*tan(d*x+c))**3,x)

[Out]

Timed out

________________________________________________________________________________________